

#include <stdio.h>
#include <cffformat.h>



int
main (int argc, char** argv)
{
	cffParser parser;
	FILE *file = fopen ("d:/programming/crimson-core/data/shaders/test.narf", "rb");
	if (!file)
		{
			return 0;
		}
	fseek (file, 0, SEEK_END);
	size_t end = ftell (file);
	fseek (file, 0, SEEK_SET);

	char *buffer = new char [end + 1];
	fread (buffer, sizeof(char*), end, file);
	fclose (file);

	buffer[end] = '\0';
	cffNode *root = parser.ParseFromBuffer (buffer);
	if (root)
		{
			root->Debug();
		}
  return 0;
}

